﻿@model IEnumerable<FreightSoft.Models.SHIPMENT>

@{
    ViewBag.Title = "AddShipments";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Add Shipments to Shipment Schedule @ViewBag.SCHEDULE_ID</h2>

@*<p>
    @Html.ActionLink("Create New", "Create")
</p>*@
<table class="table table-striped">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.SHIPMENTID)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ORIGINPORT)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DESTINATIONPORT)
        </th>
        @*<th>
            @Html.DisplayNameFor(model => model.SCHEDULEID)
        </th>*@
        <th>
            @Html.DisplayNameFor(model => model.WEIGHT)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.VOLUME)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.STATUS)
        </th>

        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.SHIPMENTID)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ORIGINPORT)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DESTINATIONPORT)
        </td>
        @*<td>
            @Html.DisplayFor(modelItem => item.SCHEDULEID)
        </td>*@
        <td>
            @Html.DisplayFor(modelItem => item.WEIGHT)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.VOLUME)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.STATUS)
        </td>
        <td>
           @* @Html.ActionLink("Add", "Add", new { id=item.SHIPMENTID }) *@
            @Html.ActionLink("Add", "Add", "Shipment", new { shipment_id = item.SHIPMENTID, schedule_id = @ViewBag.SCHEDULE_ID}, null) |

           @* @Html.ActionLink("Edit", "Edit", new { id=item.SHIPMENTID }) |*@
            @Html.ActionLink("Details", "Details", new { id=item.SHIPMENTID }) 
            @*@Html.ActionLink("Delete", "Delete", new { id=item.SHIPMENTID })*@
        </td>
    </tr>
}

</table>
<p>
   @* @Html.ActionLink("Edit", "Edit", new { id=Model.SHIPMENTID }) |*@
    @Html.ActionLink("Back to Details", "Details", "ShipmentSchedule", new { id = @ViewBag.SCHEDULE_ID }, null)
 </p>
